package com.yc.bran.snack.dto;

public class SelectedItemDTO {
	private Integer uid;
	private Integer cno;
	private Integer gid;
	private String gname;
	private Integer num;
	private String gpic;
	private double gprice;
	private Boolean select = true;
	public Integer getUid() {
		return uid;
	}
	public void setUid(Integer uid) {
		this.uid = uid;
	}
	public Integer getCno() {
		return cno;
	}
	public void setCno(Integer cno) {
		this.cno = cno;
	}
	public Integer getGid() {
		return gid;
	}
	public void setGid(Integer gid) {
		this.gid = gid;
	}
	public String getGname() {
		return gname;
	}
	public void setGname(String gname) {
		this.gname = gname;
	}
	public Integer getNum() {
		return num;
	}
	public void setNum(Integer num) {
		this.num = num;
	}
	public String getGpic() {
		return gpic;
	}
	public void setGpic(String gpic) {
		this.gpic = gpic;
	}
	public double getGprice() {
		return gprice;
	}
	public void setGprice(double gprice) {
		this.gprice = gprice;
	}
	public Boolean getSelect() {
		return select;
	}
	public void setSelect(Boolean select) {
		this.select = select;
	}
	@Override
	public String toString() {
		return "SelectedItemDTO [uid=" + uid + ", cno=" + cno + ", gid=" + gid + ", gname=" + gname + ", num=" + num
				+ ", gpic=" + gpic + ", gprice=" + gprice + ", select=" + select + "]";
	}
	public SelectedItemDTO(Integer uid, Integer cno, Integer gid, String gname, Integer num, String gpic, double gprice,
			Boolean select) {
		super();
		this.uid = uid;
		this.cno = cno;
		this.gid = gid;
		this.gname = gname;
		this.num = num;
		this.gpic = gpic;
		this.gprice = gprice;
		this.select = select;
	}
	public SelectedItemDTO() {
		super();
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((cno == null) ? 0 : cno.hashCode());
		result = prime * result + ((gid == null) ? 0 : gid.hashCode());
		result = prime * result + ((gname == null) ? 0 : gname.hashCode());
		result = prime * result + ((gpic == null) ? 0 : gpic.hashCode());
		long temp;
		temp = Double.doubleToLongBits(gprice);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + ((num == null) ? 0 : num.hashCode());
		result = prime * result + ((select == null) ? 0 : select.hashCode());
		result = prime * result + ((uid == null) ? 0 : uid.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SelectedItemDTO other = (SelectedItemDTO) obj;
		if (cno == null) {
			if (other.cno != null)
				return false;
		} else if (!cno.equals(other.cno))
			return false;
		if (gid == null) {
			if (other.gid != null)
				return false;
		} else if (!gid.equals(other.gid))
			return false;
		if (gname == null) {
			if (other.gname != null)
				return false;
		} else if (!gname.equals(other.gname))
			return false;
		if (gpic == null) {
			if (other.gpic != null)
				return false;
		} else if (!gpic.equals(other.gpic))
			return false;
		if (Double.doubleToLongBits(gprice) != Double.doubleToLongBits(other.gprice))
			return false;
		if (num == null) {
			if (other.num != null)
				return false;
		} else if (!num.equals(other.num))
			return false;
		if (select == null) {
			if (other.select != null)
				return false;
		} else if (!select.equals(other.select))
			return false;
		if (uid == null) {
			if (other.uid != null)
				return false;
		} else if (!uid.equals(other.uid))
			return false;
		return true;
	}
	
	
	
}